package cc.yaomm.service.basic.controller.business.user;

import cc.yaomm.common.basic.domain.Paging;
import cc.yaomm.common.basic.domain.Response;
import cc.yaomm.service.basic.controller.business.BaseAdminController;
import cc.yaomm.service.basic.controller.business.login.biz.LoginAdminBiz;
import cc.yaomm.service.basic.controller.business.login.vo.LoginParamVO;
import cc.yaomm.service.basic.controller.business.login.vo.LoginResultVO;
import cc.yaomm.service.basic.controller.business.user.biz.ResourceBiz;
import cc.yaomm.service.basic.controller.business.user.vo.ResourceParamVO;
import cc.yaomm.service.basic.controller.business.user.vo.ResourceResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * Created by XQL on 2021/6/9.
 */
@RestController
@RequestMapping("${apps.biz}/resource")
@Api(tags = "请求资源接口")
@Slf4j
public class ResourceController extends BaseAdminController {

    @Autowired
    private ResourceBiz resourceBiz;

    @PostMapping("list")
    @ApiOperation(value = "资源列表", notes = "资源列表")
    public Response<Paging<ResourceResultVO>> list(@RequestBody @Valid Paging<ResourceParamVO> paramVO) {
        return Response.success(resourceBiz.findPage(paramVO));
    }

}
